package nl.memedefense.level;

import nl.memedefense.monster.Wave;

import java.util.ArrayList;
import java.util.List;

/**
 * A level is a container for graphical components (e.g. {@link Tile}s and {@link nl.memedefense.tower.Tower}s) but also
 * non-graphical components (e.g. {@link nl.memedefense.monster.Wave}s).
 *
 * @author Robin van Breukelen
 */
public class Level {

    private List<Tile> tiles;
    private Wave currentWave;

    /**
     * Constructs a new Level.
     */
    public Level() {
        tiles = new ArrayList<Tile>();
    }

    /**
     * Adds a {@link Tile} to this level. Tiles do not necessarily have to be added in the order as they should appear
     * on screen as each {@link Tile} knows where it should be placed on screen.
     *
     * @param tile {@link Tile} to add to this level.
     */
    public void addTile(Tile tile) {
        tiles.add(tile);
    }

    /**
     * Adds a wave this level. When a new wave is added all monsters will be rendered on the screen.
     *
     * @param wave {@link Wave} to put on the level.
     */
    public void newWave(Wave wave) {
        this.currentWave = wave;
    }

}
